package com.learning.crpc.consummer;

import java.lang.reflect.Proxy;

/**
 * @program: diy_rpc
 * @description:
 * @author: CaoYong
 * @create: 2021-07-01 16:33
 **/
public class ProxyFactory {

    public static Object getProxy(Class<?>[] interfaces) {
        return Proxy.newProxyInstance(
                ProxyFactory.class.getClassLoader(),
                interfaces,
                new CrpcInvocationHandler()
        );
    }
}
